package com.desksoft.ecommerce.vo.mall;

import java.math.BigDecimal;

import com.desksoft.ecommerce.base.Entity;

/***************************************
 * <pre>
 * 版权所有：杭州迪科软件 保留所有权利
 * 创建日期: 2012-7-10
 * 创建作者：rq
 * 文件名称：PayInfoVO.java
 * 版本：1.0
 * 功能：
 * 最后修改时间：2012-7-10
 * 修改记录：
 * </pre>
 *****************************************/
public class PayInfoVO implements Entity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// -1未选择支付方式,
	// 0余额支付,
	// 1其它支付方式111(支付宝)112(网银)113(财付通)12(货到付款)13(银行汇款),
	// 2混合支付20111(混合=余额+支付宝)20112(混合=余额+网银)20113(混合=余额+财付通)2012(混合=余额+货到付款)2013(混合=余额+银行汇款)

	// 余额支付
	/**
	 * 账户余额支付
	 */
	public static final String AMOUNT_PAY_CODE = "0";

	// 其它支付
	/**
	 * 支付宝支付
	 */
	public static final String ALI_PAY_CODE = "111";
	/**
	 * 网银支付
	 */
	public static final String EBANK_PAY_CODE = "112";
	/**
	 * 财付通支付
	 */
	public static final String TEN_PAY_CODE = "113";
	/**
	 * 货到付款
	 */
	public static final String ARRIVAL_PAY_CODE = "12";
	
	/**
	 * 延期支付
	 */
	public static final String DEFERRED_PAY_CODE = "10";
	
	/**
	 * 银行汇款
	 */
	public static final String REMIT_PAY_CODE = "13";

	// 混合支付
	/**
	 * 余额支付宝混合
	 */
	public static final String MIX_AALI_PAY_CODE = "20111";
	/**
	 * 余额网银混合
	 */
	public static final String MIX_AEBAK_PAY_CODE = "20112";
	/**
	 * 余额财付通混合
	 */
	public static final String MIX_ATEN_PAY_CODE = "20113";
	/**
	 * 余额货到付款
	 */
	public static final String MIX_AARR_PAY_CODE = "2012";
	/**
	 * 余额银行汇款
	 */
	public static final String MIX_AREM_PAY_CODE = "2013";

	// 客户编码
	private String clientCode;
	// 支付编码
	private String payType;
	// 订单编码
	private String billNo;
	// 订单金额
	private BigDecimal amt;
	// 帐号余额
	private BigDecimal amount;
	// 支付帐号余额后缺的金额
	private BigDecimal yamt;
	
	private String userid;
	
	private String dccode;
	
	private String storecode;

	 //网站类型
	private String webtype;
	
	//会员名字
	private String taxno;
	
	//订单状态
	private String status;
	
	//订单结算状态
	private String balatag;
	
	//订单结算方式
	private String balattype;

	//订单储值余额
	private float prepaydeposit;
	
	//订单返现余额
	private float prepaybonus;
	
	//订单支付方式类型(中文：第三方，余额支付，网上支付)
	private String banktype;
	
	//订单支付银行名称(支付宝，网银，财付通，工商银行)
	private String bankname;

	//余额支付或者在线支付
	private String typet;
	
	//支付流水号
	private String paylistno;
	
	private String leaveWord;
	
	//买家账号
	private String paymessage; 
	
	public String getPaymessage() {
		return paymessage;
	}

	public void setPaymessage(String paymessage) {
		this.paymessage = paymessage;
	}

	public String getLeaveWord() {
		return leaveWord;
	}

	public void setLeaveWord(String leaveWord) {
		this.leaveWord = leaveWord;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getDccode() {
		return dccode;
	}

	public void setDccode(String dccode) {
		this.dccode = dccode;
	}

	public String getStorecode() {
		return storecode;
	}

	public void setStorecode(String storecode) {
		this.storecode = storecode;
	}

	public String getWebtype() {
		return webtype;
	}

	public void setWebtype(String webtype) {
		this.webtype = webtype;
	}

	public String getTaxno() {
		return taxno;
	}

	public void setTaxno(String taxno) {
		this.taxno = taxno;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getBalatag() {
		return balatag;
	}

	public void setBalatag(String balatag) {
		this.balatag = balatag;
	}

	public String getBalattype() {
		return balattype;
	}

	public void setBalattype(String balattype) {
		this.balattype = balattype;
	}

	public float getPrepaydeposit() {
		return prepaydeposit;
	}

	public void setPrepaydeposit(float prepaydeposit) {
		this.prepaydeposit = prepaydeposit;
	}

	public float getPrepaybonus() {
		return prepaybonus;
	}

	public void setPrepaybonus(float prepaybonus) {
		this.prepaybonus = prepaybonus;
	}

	public String getBanktype() {
		return banktype;
	}

	public void setBanktype(String banktype) {
		this.banktype = banktype;
	}

	public String getBankname() {
		return bankname;
	}

	public void setBankname(String bankname) {
		this.bankname = bankname;
	}

	public String getTypet() {
		return typet;
	}

	public void setTypet(String typet) {
		this.typet = typet;
	}

	public String getPaylistno() {
		return paylistno;
	}

	public void setPaylistno(String paylistno) {
		this.paylistno = paylistno;
	}

	/**
	 * 商品名称
	 */
	private String itemName;
	private String itemDesc;
	private String clientIp;

	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public String getItemDesc() {
		return itemDesc == null ? "" : itemDesc;
	}

	public void setItemDesc(String itemDesc) {
		this.itemDesc = itemDesc;
	}

	public String getItemName() {
		return itemName == null ? "" : itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getClientCode() {
		return clientCode;
	}

	public void setClientCode(String clientCode) {
		this.clientCode = clientCode;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public String getBillNo() {
		return billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}

	public BigDecimal getAmt() {
		return amt;
	}

	public void setAmt(BigDecimal amt) {
		this.amt = amt;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getYamt() {
		return yamt;
	}

	public void setYamt(BigDecimal yamt) {
		this.yamt = yamt;
	}

	public BigDecimal getTotalFee() {
		if (this.getPayType().equals(PayInfoVO.AMOUNT_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.ALI_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.EBANK_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.TEN_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.ARRIVAL_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.REMIT_PAY_CODE)) {
			return this.amt;
		} else if (this.getPayType().equals(PayInfoVO.MIX_AALI_PAY_CODE)) {
			return this.yamt;
		} else if (this.getPayType().equals(PayInfoVO.MIX_AEBAK_PAY_CODE)) {
			return this.yamt;
		} else if (this.getPayType().equals(PayInfoVO.MIX_ATEN_PAY_CODE)) {
			return this.yamt;
		} else if (this.getPayType().equals(PayInfoVO.MIX_AARR_PAY_CODE)) {
			return this.yamt;
		} else if (this.getPayType().equals(PayInfoVO.MIX_AREM_PAY_CODE)) {
			return this.yamt;
		}
		return new BigDecimal(0);
	}
//
//	private HttpServletRequest request;
//	private HttpServletResponse response;
//	
//	public HttpServletRequest getRequest() {
//		return request;
//	}
//
//	public HttpServletResponse getResponse() {
//		return response;
//	}
//
//	public void setRequest(HttpServletRequest request) {
//		this.request = request;
//	}
//
//	public void setResponse(HttpServletResponse response) {
//		this.response = response;
//	}
}
